home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ╔═══════════════════════════════════╗
- ║ Disk OrGanizer - Version 1.00 ║
- ║ ║
- ║ Soft GAMs Software ║
- ║ (c) Copyright 1986 ║
- ║ ║
- ║ Three GAMs Software ║
- ║ G. Allen Morris III ║
- ║ 1411 10th Avenue ║
- ║ Oakland, CA 94606 ║
- ╟───────────────────────────────────╢
- ║ Mail may be left at ║
- ║ Satorie Center ║
- ║ FIDO #125/521 (ALLEN MORRIS) ║
- ║ (415)647-8528 ║
- ╚═══════════════════════════════════╝
-
-
- TABLE OF CONTENTS
-
- INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . 1
-
- BACKGROUND PROGRAMS . . . . . . . . . . . . . . . . . . . . 1
-
- LIMITS . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
-
- ORGANIZING YOUR DISK . . . . . . . . . . . . . . . . . . . . 2
-
- RUNNING Disk OrGanizer THE FIRST TIME . . . . . . . . . . . 4
-
- ADVANCED FEATURES . . . . . . . . . . . . . . . . . . . . . 4
-
- COMMANDS . . . . . . . . . . . . . . . . . . . . . . . . . . 7
-
-
-
-
- INTRODUCTION
-
- This program was written to help people to speed up disk access,
- it will be of most help to people that are using large data files
- or programs that use overlays.
- What the program does it allow you to de-fragment and order the
- files and sub-directories on a disk. The program also compresses
- the directories which will speed up finding files in directories.
- Depending on the way the data on your disks is being accessed you
- may or may not notice a large difference in performance.
-
-
- BACKGROUND PROGRAMS
-
- You can not have BACKGROUND programs that read or write the disk
- that you are Organizing. The reason for this is that DiskOrGanizer
- writes directly to the disk and does not use DOS, so DOS will not
- know were to read or write data to or from. Which will cause
- them to read garbage and to write to Clusters that are used by
- other programs. If writes occur large amounts of data can be
- lost as the directories can be over written. I am working on
- ways around this problem, but I have not come up with a good one
- yet.
-
-
- DATA LOSS
-
- In normal operation there should be no data loss, with the exception
- of write errors that are not detected by MSDOS. This is the same
- verification that DOS uses to verify data that is Copied. Disk-
- OrGanizer has as switch that will allow it to run without verifying
- data and it will run faster if it does not verify the data, But
- there is a greater chance of data loss. I would suggest that you
- use the verify on floppy disks. On hard disks it is up to you, I
- have not had a write error on my hard disk after running it for
- over a year.
-
-
- POWER FAILURE
-
- In a power failure some problems can occur, but they can all be
- fixed buy running CHKDSK and DiskOrGanizer.
-
- If a file is being moved there is only a problem if the power
- failure occurs between the time that the directory is written and
- the FAT is written, CHKDSK can recover all of the data as it will
- be in two places on the disk. To recover from this run 'CHKDSK /f'
- you will see the following:
-
- 1 lost cluster found in 1 chains.
- Convert lost chains to files (Y/N)? (Answer No)
- nnnn bytes disk space freed.
-
-
-
- You will then get the rest of the information from CHKDSK.
-
- If Disk OrGanizer was moving a sub-directory then you may also see
- the message:
- d:\subdir\sibling
- Invalid sub-directory entry.
-
- This message is generated if the power failure occurred between
- writing the sub-directory and it's sibling. You may get messages
- stating that there are more than one invalid sub-directory entries.
- This is normal as long as they all are sibling of the same parent.
-
- There is only one other problem that can occur and that is if the
- power failure occurs between the time that the first FAT is written
- and the second FAT is written. If this happens the next time
- that you run DiskOrGanizer you will see the message:
-
- FATs do not compare. (If you have not just run CHKDSK answer No)
- Would you like to fix FAT2?
-
- Answering Yes to this question will write FAT1 into FAT2 and you
- will be off and running.
-
- NOTE:
- It is always important to run CHKDSK after a power failure to
- correct any problems that may have occurred wether you were running
- DiskOrGanizer or not.
-
-
- LIMITS
-
- Because the FAT and directories are read into memory there are
- some limits to there sizes.
-
- There must be less than 32000 clusters on the disk. If you have
- a disk with more than 32000 clusters write me or leave a message
- on the bulletin board listed below and we can talk about getting
- you a special version of DiskOrGanizer.
-
- There also cannot be more than 2000 files any one directory. Again
- if you have this problem I can probably modify the program to run
- on your disk.
-
- The only other limit is how much memory your computer has limits
- the total number of files that can be on the entire disk. Each
- directory entry takes about 34 bytes so if you have 300k of free
- memory you will be limited to about 8000 total files before you
- run out of memory.
-
-
- ORGANIZING YOUR DISK
-
- It is hard to say what is the best way to organize a disk as it
-
-
- will be different for each application. But I will try to describe
- some of the main considerations here.
-
- First we need a slight understanding of how MSDOS handles the
- files on a disk.
-
- Opening a file: When a file is opened DOS creates a FILE handle
- for the file. The number of file handles that can be opened is
- controlled by the FILES= command in your CONFIG.SYS file. In the
- FILE handle DOS saves information about were the data is stored
- on the disk. This involves reading the directory or directories
- if the file is not in the current directory and the FAT.
-
- Reading from a file: When data is read from a file DOS looks at
- the FILE handle to find the data and then reads the data into one
- of the buffers that were defined in the BUFFERS= command in the
- CONFIG.SYS file. If this data is read again it will be read out
- of this buffer and not off the disk.
-
- Writing to a file: When data is written to a file DOS looks to
- see if the data from the location that it is going to write to is
- in a buffer, if it is DOS over writes the buffer and then writes
- the data to the disk. If the data was not already in a buffer
- DOS will put the data into a buffer and then write it to the disk
- if this data is then read DOS will get the data from this buffer
- rather than the disk.
-
- Closing a file: When a file that has been written to is closed by
- DOS uses the data in the FILE handle which was updated by each
- write to update the directory entry for the file and update the FAT.
-
- We can see from this that the FAT and directory is only used when
- a file is opened or closed. Because of this it is not terribly
- important to keep the files on the outer tracks (close to the
- FAT) unless the file is opened and closed often.
-
- So what files are opened and closed a lot? Well Batch files are
- opened and closed between each operation. EXE and COM files that
- are simple utilities such as ASK.COM are also opened and closed
- often. Overlay files are also opened and closed often, QMODEM
- would run faster if it's overlay files were on the outer tracks.
- Larger EXE and COM files should come after these as they are not
- opened and closed as often.
-
- All of these files almost never change in size and therefore will
- not become fragmented this also makes them good candidates for
- being put on the inner tracks of the disk.
-
- Many data files are opened once read many times and then closed.
- Most of the time on these files is spend reading the data and if
- there are not enough BUFFERS to hold the entire file the disk
- will have to be read repeatedly. So the location of these files
- is not very important but it is important that the data in the
- file is close together. Also if the file is used by a database
-
-
- manager and is indexed by another file we would want both of these
- files to be close together. In some applications there may be
- many files that are open at the same time and we would want all
- of them to be close together.
-
- The last type of file I can think of is a data file that is written
- to often. These files change size and become fragmented. Yet
- many of these files have the same needs as the previous type. If
- these files are placed last Disk OrGanizer will be able to de-
- fragment them faster and therefore they should be placed last on
- the disk.
-
-
- RUNNING Disk OrGanizer THE FIRST TIME
-
- Disk OrGanizer has been tested with MSDOS 2.10 and MSDOS 3.00. It
- has also been used on disks as big as 20 Megabytes.
- There is extensive testing done to make sure that the disk can be
- read and written and that the FAT and that directories are in good
- repair. It is very unlikely that Disk OrGanizer will hurt the
- data on your disk, but it is always a good idea to have the data
- on a hard disk on BACKUP disks or tape and to have a copy of data
- on floppy disks.
-
- If the file ORDER.DOG is not found in the root directory of the
- disk that you specify Disk Organizer will prompt you for all of
- the information that it needs. To organize a disk other that the
- current drive use the command DOG d:, 'd' being the drive letter
- of the drive you wish to organize.
-
-
- ADVANCED FEATURES
-
- There are several ways that Disk OrGanizer can Optimize the data
- on your disk. They are as follows:
-
- Fast Order.
- This forces all un-fragmented files to stay were they are
- and then attempts to put fragmented files into free areas that
- are left. If a fragmented file will not fit into any of the
- free areas it is then stored in two or more of the free areas.
-
- Directory order.
- This puts the files onto the disk in the order that they are
- in the directories. You can use the TREE command to get a
- ruff idea of what this looks like.
-
- Packed order.
- This leaves the files in the same order as it finds them on
- the disk. It will leave only one area of free disk space at
- the outer tracks of the disk.
-
- Fragmented order.
-
-
- This will put all of the files that are not fragmented on
- the disk first and will then put the fragmented files on the
- disk. Using this function will slowly put all of the files
- that change size on the outer tracks of the disk. You can
- use this function to get a similar effect to the special
- order function but it will take several passes over several
- days.
-
-
- Ok so you want you files to be just so. In order to do this you
- will need to make a file that lists the files in the order that
- you want them on the disk. Files need to have there full path
- names included. Sub-directories are treated as files and not as a
- wild card pointing to all of the files in the sub-directory.
- There is also a switch that can be included to tell Disk OrGanizer
- where to leave free space.
- The utility DOGMAKE is included to help you make this file. You
- may also need a text editor that has a non-document mode to sort,
- delete or add to this file.
- The default name for this file is "ORDER.DOG" and it should be in
- the ROOT directory of the disk being worked on, or you can also
- give Disk OrGanizer the name and path of the file you wish to use.
-
- Below is a sample of what this file should look like.
-
- [noverify]
- [fast] ;This tells Disk OrGanizer how to handle
- ;any unnamed files or sub-directories.
- [FORCE]
- \COMMAND.COM ;This fill force COMMAND.COM to remain
- ;were it is. This command should come
- ;before any other files are named. This
- ;command will not be of much use to most
- ;users.
- [ENDFORCE] ;This tell DiskOrGanizer that the following
- ;file should be placed in order.
- \AUTOEXEC.BAT
- \PROG1.OVL
- \PROG2.OVL
- \SUBDIR_A\PROG1.OVL ;This is different than \PROG1.OVL
- \SUBDIR_A
- \SUBDIR_B
- [HIGH] ;This tell Disk OrGanizer that the rest
- ;of the files should be placed on the
- ;inner tracks.
- \CONFIG.SYS ;This will be the last file on the disk
- ;and its last cluster will occupy the
- ;last cluster on the disk.
- \ORDER.DOG ;You can include this file.
- \ORDER.BAK ;This will be the third from the last
- ;file on the disk.
-
- As you can see it will take some work to make this file. The DOGMAKE
- utility can help you make this file. Basically DOGMAKE is a WHEREIS
-
-
- program. The difference is that it outputs the full path name
- along with the file or sub-directory name. it output goes to the
- standard output device.
- So you can either run DOGMAKE *.* and then use your text editor to
- sort the data or you can run DOGMAKE something like this:
-
- DOGMAKE command.com > \order.dog
- DOGMAKE autoexec.bat >> \order.dog
- DOGMAKE *.ovl >> \order.dog
- DOGMAKE SUBDIR* >> \order.dog
- DOGMAKE CONFIG.SYS >> \order.dog
- DOGMAKE ORDER.DOG >> \order.dog
-
- This would give you a file resembling the ORDER.DOG sample above.
-
- After you have gotten ORDER.DOG made you can run Disk OrGanizer.
-
- Use the following command:
-
- DOG
-
- If you want to use a different filename than "\ORDER.DOG" you can
- use:
-
- DOG path\filename.ext
-
-
-
- COMMANDS
-
- DOG [d:] [path\filename.ext] [/FA|/FR|/PA|/DI] [/NV]
-
- [FAST] /FA This forces all un-fragmented files to stay
- were they are and then attempts to put frag-
- mented files into free areas that are left.
- If a fragmented file will not fit into any of
- the free areas it is then stored in two or
- more of the free areas.
-
- [FRAGMENTED] /FR This will put all of the files that are not
- fragmented on the disk first and will then
- put the fragmented files on the disk. Using
- this function will slowly put all of the files
- that change size on the outer tracks of the
- disk. You can use this function to get a similar
- effect to the special order function but it
- will take several passes over several days.
-
- [PACKED] /PA This leaves the files in the same order as it
- finds them on the disk. It will leave only
- one area of free disk space at the outer tracks
- of the disk.
-
- [DIRECTORY] /DI This puts the files onto the disk in the order
- that they are in the directories. You can use
- the TREE command to get a ruff idea of what
- this looks like.
-
- [NOVERIFY] /NV This tells DiskOrGanizer to turn off the MSDOS
- verify switch. DiskOrGanizer turns on the
- verify switch unless told not too.
-
- [HIGH] This tells DiskOrganizer to put the rest of
- the files in ORDER.DOG on the inner tracks of
- the disk.
-
- [FREE nn] This tells DiskOrganizer to leave nn clusters
- of free space. There must be enough free
- area on the disk or the command will be ignored.
-
- [FORCE] FORCE allows you to keep Disk OrGanizer from
- doing any work on a particular file or group
- of files. It must be followed by an ENDFORCE.
-
- [ENDFORCE] This tells Disk OrGanizer to stop FORCEing
- files.
-
-
-
-
- INDEX
-
- [DIRECTORY] . . . . . . . . . . . . . . . . . . . . . . . . . 7
- [ENDFORCE] . . . . . . . . . . . . . . . . . . . . . . . . . . 7
- [FAST] . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
- [FORCE] . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
- [FRAGMENTED] . . . . . . . . . . . . . . . . . . . . . . . . . 7
- [FREE nn] . . . . . . . . . . . . . . . . . . . . . . . . . . 7
- [HIGH] . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
- [NOVERIFY] . . . . . . . . . . . . . . . . . . . . . . . . . . 7
- [PACKED] . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
- /DI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
- /FA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
- /FR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
- /NV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
- /PA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
- BACKGROUND PROGRAMS . . . . . . . . . . . . . . . . . . . . . 1
- DATA LOSS . . . . . . . . . . . . . . . . . . . . . . . . . . 1
- DOGMAKE . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
- DOS I/O
- Closing a file . . . . . . . . . . . . . . . . . . . . . 3
- Opening a file . . . . . . . . . . . . . . . . . . . . . 3
- Reading from a file . . . . . . . . . . . . . . . . . . . 3
- Writing to a file . . . . . . . . . . . . . . . . . . . . 3
- INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . 1
- LIMITS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
- ORDER.DOG . . . . . . . . . . . . . . . . . . . . . . . . . . 5
- ORGANIZING YOUR DISK . . . . . . . . . . . . . . . . . . . . . 2
- POWER FAILURE . . . . . . . . . . . . . . . . . . . . . . . . 1
- RUNNING Disk OrGanizer THE FIRST TIME . . . . . . . . . . . 4
-
-